-- GENERATED SPELL FOR [Illidari Archon] --


function spell0_23400(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(41372,pUnit)
pUnit:RegisterEvent('Sorts_23400', 2000, 1)
end

function spell1_23400(pUnit, Event) --@Holy Smite,n/a--
pUnit:FullCastSpellOnTarget(41370,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23400', 2500, 1)
end

function spell2_23400(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(41374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23400', 1500, 1)
end

function spell3_23400(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(41373,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23400', 30302, 1)
end

function spell4_23400(pUnit, Event) --@Shadow Word: Death,n/a--
pUnit:FullCastSpellOnTarget(41375,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23400', 544, 1)
end

function spell5_23400(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(29406,pUnit)
pUnit:RegisterEvent('Sorts_23400', 528, 1)
end

function Sorts_23400(pUnit, Event)
local choix_sorts_23400 = math.random(0, 5)
if choix_sorts_23400 == 0 then
pUnit:RegisterEvent('spell0_23400', 1, 1)
end
if choix_sorts_23400 == 1 then
pUnit:RegisterEvent('spell1_23400', 1, 1)
end
if choix_sorts_23400 == 2 then
pUnit:RegisterEvent('spell2_23400', 1, 1)
end
if choix_sorts_23400 == 3 then
pUnit:RegisterEvent('spell3_23400', 1, 1)
end
if choix_sorts_23400 == 4 then
pUnit:RegisterEvent('spell4_23400', 1, 1)
end
if choix_sorts_23400 == 5 then
pUnit:RegisterEvent('spell5_23400', 1, 1)
end
end

function mob23400_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23400', math.random(1500, 3000), 1)
end

function mob23400_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23400_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23400_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23400, 1, 'mob23400_Action')
RegisterUnitEvent(23400, 2, 'mob23400_Leave')
RegisterUnitEvent(23400, 3, 'mob23400_Kill')
RegisterUnitEvent(23400, 4, 'mob23400_Die')
